package com.czk.gateway.inclusivegateway;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.ProcessEngines;
import org.activiti.engine.RepositoryService;

/**
 * 包含网关的添加
 * @Author ChenZhangKun
 * @Date 2020/9/15 16:13
 */
@SuppressWarnings("all")
public class Deployment {
    public static void main(String[] args) {
        // 获取流程引擎
        ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
        // 获取部署任务
        RepositoryService repositoryService = processEngine.getRepositoryService();
        // 部署bpm
        org.activiti.engine.repository.Deployment deployment = repositoryService.createDeployment()
                .addClasspathResource("diagram/inclusive.bpmn")
                .addClasspathResource("diagram/inclusives.png")
                .name("体检流程")
                .deploy();
        // 输出部署信息
        System.out.println("部署名称 "+deployment.getName());
        System.out.println("部署id "+deployment.getId());
    }
}
